﻿using Microsoft.Extensions.Configuration;
using System.Collections.Generic;

namespace VisionCloud.Utility
{
    public class VisionCloudGlobalContext
    {
        /// <summary>
        /// 全局配置
        /// </summary>
        public static IConfiguration Configuration { get; set; }

        /// <summary>
        /// Minio桶映射关系
        /// </summary>
        public static Dictionary<string, string> MinioPrefix { get; set; }

        /// <summary>
        /// 获取配置值
        /// </summary>
        /// <param name="sectionName"></param>
        /// <returns></returns>
        public static string GetSection(string sectionName)
        {
            return Configuration.GetSection(sectionName).Value;
        }
    }
}